#!/bin/sh

LDMSESSION=/usr/share/xsessions/lightdm-xsession.desktop

#install dependecies
sudo apt install gcc make libxinerama-dev libxft-dev git compton xwallpaper mpv zathura pulsemixer xinput libx11-xcb-dev libxcb-res0-dev

# Needed repos
repos="st dwm configScripts"
mkdir -p ~/Projects
cd ~/Projects

# Iterate through repos and do some magic
for repo in $repos; do
	git clone https://notabug.org/Beformed/$repo
	if [ "$repo" = "configScripts" ] 
	then	
		cd $repo
		echo "Moved to $(pwd)"
		sudo cp display-visor sdwmbar startdwm /usr/local/bin
		echo "Copied files to bin directory"
		cd ../
	else
		cd $repo
		echo "Moved to $(pwd)"
		sudo make install
		cd ../
	fi
done

sudo sed -i 's/Exec=default/Exec=startdwm/' $LDMSESSION
